﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using Contributor.Data_Objects;

namespace Contributor
{
    /// <summary>
    /// Interaction logic for ucEntityDisplay.xaml
    /// </summary>
    public partial class ucEntityDisplay : UserControl
    {
        public ucEntityDisplay()
        {
            InitializeComponent();
        }

        public void LoadEntity(EntitySearch entitySearch)
        {
            Entity entity = new Entity();
            entity.LoadEntity(entitySearch.EntityID);
            entityDetails.DataContext = entity;
            gridPeople.ItemsSource = entity.People;
            gridContribution.ItemsSource = entity.Contributions;
            Utility.BuildCommentBlock( CommentBox, entity);
        }
    }
}
